﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="WorkItemChangedEvent" nillable="true" type="WorkItemChangedEvent" />
  <xs:complexType name="WorkItemChangedEvent">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="PortfolioProject" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="ProjectNodeId" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="AreaPath" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Title" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="WorkItemTitle" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Subscriber" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="ChangerSid" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="DisplayUrl" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="TimeZone" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="TimeZoneOffset" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="ChangeType" type="ChangeTypes" />
      <xs:element minOccurs="0" maxOccurs="1" name="CoreFields" type="CoreFieldsType" />
      <xs:element minOccurs="0" maxOccurs="1" name="TextFields" type="ArrayOfTextField" />
      <xs:element minOccurs="0" maxOccurs="1" name="ChangedFields" type="ChangedFieldsType" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddedFiles" type="ArrayOfAddedFile" />
      <xs:element minOccurs="0" maxOccurs="1" name="DeletedFiles" type="ArrayOfDeletedFile" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddedResourceLinks" type="ArrayOfAddedResourceLink" />
      <xs:element minOccurs="0" maxOccurs="1" name="DeletedResourceLinks" type="ArrayOfDeletedResourceLink" />
      <xs:element minOccurs="0" maxOccurs="1" name="ChangedResourceLinks" type="ArrayOfChangedResourceLink" />
      <xs:element minOccurs="0" maxOccurs="1" name="AddedRelations" type="ArrayOfAddedRelation" />
      <xs:element minOccurs="0" maxOccurs="1" name="DeletedRelations" type="ArrayOfDeletedRelation" />
      <xs:element minOccurs="0" maxOccurs="1" name="ChangedRelations" type="ArrayOfChangedRelation" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="ChangeTypes">
    <xs:restriction base="xs:string">
      <xs:enumeration value="New" />
      <xs:enumeration value="Change" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CoreFieldsType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="IntegerFields" type="ArrayOfIntegerField" />
      <xs:element minOccurs="0" maxOccurs="1" name="StringFields" type="ArrayOfStringField" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfIntegerField">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Field" type="IntegerField" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="IntegerField">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="ReferenceName" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="OldValue" type="xs:int" />
      <xs:element minOccurs="1" maxOccurs="1" name="NewValue" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfStringField">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Field" type="StringField" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="StringField">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="ReferenceName" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="OldValue" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="NewValue" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfTextField">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="TextField" nillable="true" type="TextField" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="TextField">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="ReferenceName" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Value" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChangedFieldsType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="IntegerFields" type="ArrayOfIntegerField" />
      <xs:element minOccurs="0" maxOccurs="1" name="StringFields" type="ArrayOfStringField" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfAddedFile">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="AddedFile" nillable="true" type="AddedFile" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AddedFile">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfDeletedFile">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DeletedFile" nillable="true" type="DeletedFile" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DeletedFile">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="FileId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfAddedResourceLink">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="AddedResourceLink" nillable="true" type="AddedResourceLink" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AddedResourceLink">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Resource" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfDeletedResourceLink">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DeletedResourceLink" nillable="true" type="DeletedResourceLink" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DeletedResourceLink">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="LinkId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfChangedResourceLink">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ChangedResourceLink" nillable="true" type="ChangedResourceLink" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChangedResourceLink">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="LinkId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfAddedRelation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="AddedRelation" nillable="true" type="AddedRelation" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AddedRelation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="WorkItemId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfDeletedRelation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DeletedRelation" nillable="true" type="DeletedRelation" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DeletedRelation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="WorkItemId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfChangedRelation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ChangedRelation" nillable="true" type="ChangedRelation" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChangedRelation">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="WorkItemId" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>
